﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NativeWiFiLibrary;

namespace WiFiChannelSpread
{
    internal static class WlanHelper
    {
        public static NetworkDevice SelectedNetworkDevice
        {
            get
            {
                NetworkDevice device = NativeWiFi.NetworkDevices.FirstOrDefault(d => d.DeviceGuid == Properties.Settings.Default.SelectedNetworkDeviceGuid);
                if (device == null && NativeWiFi.NetworkDevices.Count > 0)
                {
                    device = NativeWiFi.NetworkDevices[0];
                }

                return device;
            }
        }
    }
}
